package com.scau402.system1.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.scau402.system.domain.WmsInboundOrder;
import com.scau402.system1.domain.po.WmsInboundOrderPO;
import com.scau402.system1.domain.vo.WmsInboundOrderExportVO;
import com.scau402.system1.domain.vo.WmsInboundOrderVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 商品入库单主表 Mapper 接口
 * </p>
 *
 * @author
 * @since 2023-12-23
 */
@Mapper
public interface IWmsInboundOrderMapper extends BaseMapper<WmsInboundOrderPO> {
    String getMaxCode(Map<String, Object> params);

    int checkExists(String inboundOrderCode);

    WmsInboundOrderPO getByInboundOrderCode(String inboundOrderCode);

    List<WmsInboundOrderExportVO> selectInboundOrderVOByOrderCodes(@Param("orderCodes") List<String> orderCodes);

    WmsInboundOrderVO selectVOByAuditId(Long id);

    @Update("update wms_new_inbound_order set audit_id = #{auditId} where id = #{inboundId}")
    void updateAuditIdById(Long auditId, Long inboundId);

}
